/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.inysa.TablasEntidades;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author chiconestor
 */
@Entity
@Table(name = "PersonalSalas", catalog = "TareosBD", schema = "dbo")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "PersonalSalas.findAll", query = "SELECT p FROM PersonalSalas p"),
    @NamedQuery(name = "PersonalSalas.findByIdSala", query = "SELECT p FROM PersonalSalas p WHERE p.idSala = :idSala"),
    @NamedQuery(name = "PersonalSalas.findBySala", query = "SELECT p FROM PersonalSalas p WHERE p.sala = :sala"),
    @NamedQuery(name = "PersonalSalas.findByIdUbicacion", query = "SELECT p FROM PersonalSalas p WHERE p.idUbicacion = :idUbicacion"),
    @NamedQuery(name = "PersonalSalas.findByUbicacion", query = "SELECT p FROM PersonalSalas p WHERE p.ubicacion = :ubicacion"),
    @NamedQuery(name = "PersonalSalas.findByDetalle", query = "SELECT p FROM PersonalSalas p WHERE p.detalle = :detalle"),
    @NamedQuery(name = "PersonalSalas.findByCodUsu", query = "SELECT p FROM PersonalSalas p WHERE p.codUsu = :codUsu"),
    @NamedQuery(name = "PersonalSalas.findByFechaMod", query = "SELECT p FROM PersonalSalas p WHERE p.fechaMod = :fechaMod")})
public class PersonalSalas implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "idSala", nullable = false)
    private Integer idSala;
    @Size(max = 2)
    @Column(name = "Sala", length = 2)
    private String sala;
    @Column(name = "idUbicacion")
    private Integer idUbicacion;
    @Size(max = 3)
    @Column(name = "Ubicacion", length = 3)
    private String ubicacion;
    @Size(max = 100)
    @Column(name = "Detalle", length = 100)
    private String detalle;
    @Size(max = 10)
    @Column(name = "CodUsu", length = 10)
    private String codUsu;
    @Column(name = "FechaMod")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fechaMod;

    public PersonalSalas() {
    }

    public PersonalSalas(Integer idSala) {
        this.idSala = idSala;
    }

    public Integer getIdSala() {
        return idSala;
    }

    public void setIdSala(Integer idSala) {
        this.idSala = idSala;
    }

    public String getSala() {
        return sala;
    }

    public void setSala(String sala) {
        this.sala = sala;
    }

    public Integer getIdUbicacion() {
        return idUbicacion;
    }

    public void setIdUbicacion(Integer idUbicacion) {
        this.idUbicacion = idUbicacion;
    }

    public String getUbicacion() {
        return ubicacion;
    }

    public void setUbicacion(String ubicacion) {
        this.ubicacion = ubicacion;
    }

    public String getDetalle() {
        return detalle;
    }

    public void setDetalle(String detalle) {
        this.detalle = detalle;
    }

    public String getCodUsu() {
        return codUsu;
    }

    public void setCodUsu(String codUsu) {
        this.codUsu = codUsu;
    }

    public Date getFechaMod() {
        return fechaMod;
    }

    public void setFechaMod(Date fechaMod) {
        this.fechaMod = fechaMod;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idSala != null ? idSala.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PersonalSalas)) {
            return false;
        }
        PersonalSalas other = (PersonalSalas) object;
        if ((this.idSala == null && other.idSala != null) || (this.idSala != null && !this.idSala.equals(other.idSala))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.inysa.TablasEntidades.PersonalSalas[ idSala=" + idSala + " ]";
    }
    
}
